﻿using System;
using System.Collections.Generic;
using System.Text;
using NExt.Core.Model.Base;

namespace NExt.UI.Base.Js
{
    public static class JsFunctions
    {
        private readonly static IScript debuggerFunction;

        static JsFunctions()
        {
            debuggerFunction = new AnonymousFunction("debugger;");
        }

        public static IScript alert(string prompt)
        {
            const string FUNCTION_FORMAT = "alert('{0}');";
            string script = string.Format(FUNCTION_FORMAT, prompt);
            return new AnonymousFunction(script);
        }

        public static IScript debugger
        {
            get { return debuggerFunction; }
        }
    }
}
